<?php

class Model_UIManager {
	
	// 返回一个指定的不带关联的数据集
	function getBaseData($tableClass, $conditions){
		$tb =& FLEA::getSingleton($tableClass);
		return $tb->findAll($conditions);
	}
	
	// 输出js代码
	function _dumpjs($jscode){
		echo "<script language=\"javascript\">\n";
        echo $jscode;
        echo "\n</script>";
	}
	
	/**
	 * 封装一个InputBox
	 * @param array attribs $params
	 */
	function _inputbox($params){
		$out = '<input ';
		foreach ($params as $key=>$value) {
			$out .= $key . '="' . $value . '" ';
		}
		$out .= ' />';
		return $out;
	}
	

}

?>
